﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 继承测试_MM路径
{
	internal class Day : CalendarUnit
	{
		private Month m_month;

		public Day(int day, Month month)
		{
			SetDay(day, month);//msg15
		}

		public void SetDay(int day, Month month)
		{
			SetCurrentPos(day);//msg16
			m_month = month;
		}

		public int GetDay()
		{
			return m_currentPos;
		}

		public override bool Increment()
		{
			bool result = false;

			m_currentPos += 1;
			if (m_currentPos < m_month.GetMonthSize())//msg17
			{
				result = true;
			}
			else
			{
				result = false;
			}
			return result;

		}
}
}
